home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1996 April / Macworld (1996-04).dmg / Educational Demos / Goldilocks Gamebook / Goldilocks.DIR / 00001_Script_1 next >
Text File  |  1995-11-20  |  2KB  |  93 lines

  1. -- Goldilocks Gamebook
  2. -- ©1995 BeachWare Inc.
  3.  
  4. on startMovie
  5.   global pageCount,naraCount,theGame
  6.   resetAll
  7.   installMenu 501
  8.   put "1G.DIR" into theGame
  9.   put 1 into pageCount
  10.   put 1 into naraCount
  11.   set the visible of sprite 9 to false
  12.   set the visible of sprite 10 to false
  13.   set the visible of sprite 17 to false
  14.   --sound stop 1
  15.   --sound stop 2
  16. end
  17.  
  18. on naraCheck
  19.   global naraCount
  20.   if soundBusy(1) = False then
  21.     if naraCount = 0 then
  22.       set the visible of sprite 9 to false
  23.       set the visible of sprite 10 to false
  24.       set the visible of sprite 17 to true
  25.       if soundBusy(1) = false then
  26.         --sound playFile 1,"Outside.AIF"
  27.         puppetSound "Outside.AIF"
  28.       end if
  29.     end if
  30.     if naraCount = 2 then
  31.       --sound playFile 1, "1B.AIF"
  32.       puppetSound "1B.AIF"
  33.       put 0 into naraCount
  34.       set the visible of sprite 9 to false
  35.       set the visible of sprite 10 to true
  36.     end if
  37.     if naraCount = 1 then
  38.       --sound playFile 1, "1A.AIF"
  39.       sound stop 1
  40.       puppetSound "1A.AIF"
  41.       put 2 into naraCount
  42.       set the visible of sprite 9 to true
  43.     end if
  44.   end if
  45. end
  46.  
  47.  
  48.  
  49. on checkPicture
  50.   global p1,p2,p3,p4,p5
  51.   if p1 = 1 then
  52.     if p2 = 1 then 
  53.       if p3 = 1 then
  54.         if p4 = 1 then
  55.           if p5 = 1 then 
  56.             --puppetSound "yea.AIF"
  57.             repeat with i = 1 to 1000
  58.             end repeat
  59.             repeat with j = 1 to 20
  60.               if the visible of sprite 12 = false then
  61.                 set the visible of sprite 12 to true
  62.               else
  63.                 set the visible of sprite 12 to false
  64.               end if
  65.               updateStage
  66.             end repeat
  67.             set the visible of sprite 7 to false
  68.             set the visible of sprite 8 to false
  69.             set the visible of sprite 9 to false
  70.             set the visible of sprite 10 to false
  71.             puppetSprite 2, False
  72.             puppetSprite 3, False
  73.             puppetSprite 4, False
  74.             puppetSprite 5, False
  75.             puppetSprite 6, False
  76.             go to "Success"
  77.           end if
  78.         end if
  79.       end if
  80.     end if
  81.   end if
  82. end 
  83.  
  84.  
  85. on resetAll
  86.   sound stop 1
  87.   sound stop 2
  88.   repeat with channel = 1 to 48
  89.     set the visible of sprite channel to TRUE
  90.     puppetSprite channel, FALSE
  91.   end repeat
  92. end
  93.